<template>
	<view>
		<!-- <view class="" v-for="(item,index) in dataInfo" :key="index">
			{{item}}
		</view> -->
		<!-- 会籍管理 -->
		<loadingComponentsVue />
	</view>
</template>

<script>
	import {
		getAllApprovalNode
	} from '../../../api/work/allNode';
	import loadingComponentsVue from '../../../components/loadingComponents.vue';
	import {
		getUserTokenInfo,
		removeUserTokenInfo
	} from '../../../utils/auth';
	export default {
		components: {
			loadingComponentsVue
		},

		data() {
			return {

				dataInfo: []

			};
		},


		onShow() {
			removeUserTokenInfo()
			this.getUserInfo()

		},
		methods: {
			async getUserInfo() {
				try {
					const {
						platform
					} = uni.getSystemInfoSync();
					const isMobile = platform === 'ios' || platform === 'android';
					const credentials =
						'(MembersCredential|WorkerMembersCredential)&UnionCredential&PhoneNumberCredential&OrgMemberCredential';
					const res = await this.userTopAuth(isMobile, credentials);
					this.formDataSet(res);
				} catch (err) {
					console.log(err);
					this.$router.back(); 
				}
			},

			formDataSet(row) {
				this.dataInfo.push(row)
				if (row.UnionCredential || row.OrgMemberCredential && row.MembersCredential || row
					.WorkerMembersCredential) {
			
					
					uni.redirectTo({
						url: '/pages/work/membershipmanagement'
					});
				}
			},

		}
	}
</script>

<style scoped>

</style>